.loader {
  width: 400px;
  margin: 0 auto;

  span {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 100%;
    background-color: #3498db;
    margin: 35px 5px;
    opacity: 0;

    &:nth-child(1) {
      animation: opacityChange 1s ease-in-out infinite;
    }

    &:nth-child(2) {
      animation: opacityChange 1s ease-in-out 0.2s infinite;
    }

    &:nth-child(3) {
      animation: opacityChange 1s ease-in-out 0.4s infinite;
    }

  }
}

@keyframes opacityChange {

  0%,
  100% {
    opacity: 0;
  }

  60% {
    opacity: 1;
  }
}
